package com.qqt.csr.common.enums;

import lombok.Getter;

@Getter
public enum StatusEnum {

	DISABLE(0, "禁用"), ENABLE(1, "启用");

	private Integer value;
	private String message;

	StatusEnum(Integer value, String message) {
		this.value = value;
		this.message = message;
	}

	public static StatusEnum of(int value) {
		for (StatusEnum statusEnum : StatusEnum.values()) {
			if (statusEnum.getValue() == value) {
				return statusEnum;
			}
		}
		return DISABLE;
	}
}
